<#include "/macro.include"/>
<#include "/java_copyright.include">
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
package ${basepackage}.dal.query;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import cn.org.rapid_framework.util.PageList;
import cn.org.rapid_framework.util.PageQuery;
import java.io.Serializable;


public class ${className}Query extends PageQuery implements Serializable {
    private static final long serialVersionUID = 3148176768559230877L;
    
    <@generateFields/>
    <@generateProperties/>

    public String toString() {
        return ToStringBuilder.reflectionToString(this,ToStringStyle.MULTI_LINE_STYLE);
    }
    
}

<#macro generateFields>

    <#list table.columns as column>
    /** ${column.columnAlias} */
    <#if column.isDateTimeColumn && !column.contains("begin,start,end")>
    private ${column.javaType} ${column.columnNameLower}Begin;
    private ${column.javaType} ${column.columnNameLower}End;
    <#else>
    private ${column.javaType} ${column.columnNameLower};
    </#if>
    </#list>

</#macro>

<#macro generateProperties>
    <#list table.columns as column>
    <#if column.isDateTimeColumn && !column.contains("begin,start,end")>
    public ${column.javaType} get${column.columnName}Begin() {
        return this.${column.columnNameLower}Begin;
    }
    
    public void set${column.columnName}Begin(${column.javaType} value) {
        this.${column.columnNameLower}Begin = value;
    }   
    
    public ${column.javaType} get${column.columnName}End() {
        return this.${column.columnNameLower}End;
    }
    
    public void set${column.columnName}End(${column.javaType} value) {
        this.${column.columnNameLower}End = value;
    }
    
    <#else>
    public ${column.javaType} get${column.columnName}() {
        return this.${column.columnNameLower};
    }
    
    public void set${column.columnName}(${column.javaType} value) {
        this.${column.columnNameLower} = value;
    }
    
    </#if>  
    </#list>
</#macro>



